Simple Image Processing

  1. Read an image using opencv
    a. Convert image from BGR to RGB without opencv
    b. Convert image from BGR to graysacle without opencv
  2. Convert from RGB to BGR
  3. Convert from RGB to grayscale
  4. Convert from BGR to grayscale
  5. Image Normalization
  6. Image Rotation by 90 degree
  7. Generic image rotation
  8. Horizontal Flipping
  9. Vertical Flipping
  10. Image right half crop
  11. Image left half crop
  12. Image lower half crop
  13. Image upper half crop
    Image in 3x3 grid simulation
  14. Image lower right corner crop
  15. Image upper left corner crop
  16. Image diagonal corner crop
  17. Image negative diagonal corner crop
  18. Center Crop

1. Read an image using opencv

get the width and height of the image

Display image

a. Convert image from BGR to RGB without opencv

b. Convert image from BGR to graysacle without opencv



2. Convert from RGB to BGR

Note: OpenCV arranges the channels in BGR order by default. So the 0th value will correspond to Blue pixel and not Red.


3. Convert from RGB to grayscale


4. Convert from BGR to grayscale


5. Image Normalization


6. Image Rotation by 90 degree

7. Generic image rotation


8. Horizontal Flipping

9. Vertical Flipping


10. Image right half crop

11. Image left half crop


12. Image lower half crop

13. Image upper half crop


Image in 3x3 grid simulation


14. Image lower right corner crop

15. Image upper left corner crop


16. Image diagonal corner crop

17. Image negative diagonal corner crop


18. Center Crop